﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Araman.Models.UserModels
{
    using Araman.Models;
    using System.Web.Mvc;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using Araman.Resources;
    public class UserPermission
    {
        [Key()]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int PermissionId { get; set; }

        [MaxLength(64, ErrorMessageResourceName = "PermissionName_MaxLength", ErrorMessageResourceType = typeof(LngModelErrors))]
        [Required(AllowEmptyStrings = false, ErrorMessageResourceName = "PermissionName_Null", ErrorMessageResourceType = typeof(LngModelErrors))]
        [Display(ResourceType = typeof(LngModelDisplayNames), Name = "PermissionName")]
        public string PermissionName { get; set; }

        [Required(AllowEmptyStrings = false, ErrorMessageResourceName = "PermissionName_LanguageKey_Null", ErrorMessageResourceType = typeof(LngModelErrors))]
        [MaxLength(64, ErrorMessageResourceName = "PermissionName_LanguageKey_MaxLength", ErrorMessageResourceType = typeof(LngModelErrors))]
        [Display(ResourceType = typeof(LngModelDisplayNames), Name = "PermissionName_LanguageKey")]
        public string PermissionNameLanguageKey { get; set; }

        public virtual UserPermissionGroup ParentPermissionGroup { get; set; }
        public virtual UserGroup ParentUserGroup { get; set; }
    }

}